import Vue from 'vue';
import Vuex from 'vuex';
import createLogger from 'vuex/dist/logger';
import app from './modules/app';
import dashboard from './modules/dashboard.js';
import getters from './getters';

Vue.use(Vuex)

const store = new Vuex.Store({
  modules: {
    app,      //commit('namespace/mutationName')
    dashboard,  //commit('namespace/mutationName')
  },
  getters,   //this.$store.state.namespace
  plugins: [createLogger()], //日志插件,用于一般的调试
})

export default store